<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .box1{ display:inline; background:gold;}
        .box2{ display:block; background:skyblue;}
    </style>
</head>
<body>
<div class="box1">块1</div>
<div class="box1">块2</div>
<span class="box2">内联1</span>
<span class="box2">内联2</span>
</body>
</html>